@extends('master')
@section('content')
<div class="container">
   <div id="alert-area">

   </div>
    <div id="photo-list" class="photo-list">
        @foreach ($pictures as $picture)
        <div class="col-md-4 item" data-id="{{ $picture->id }}">
            <div class="wrap-picture">
                <div class="item-header">
                    <div class="col-md-8">
                        <h5>
                       <i class="glyphicon glyphicon-picture"></i>
                       <span class="picture-name">{{ $picture->name }}</span>
                   </h5>
                    </div>
                    <div class="col-md-4 action-btn">
                       	@if(!Auth::check())
                        <a href="javascript:void(0);" data-toggle="tooltip" data-placement="left" title="添加到选片台"><i class="glyphicon glyphicon-plus add-project" data-toggle="modal" data-target="#login"></i></a>
                        <a href="javascript:void(0);" data-toggle="tooltip" data-placement="left" title="添加到购物车"><i class="glyphicon glyphicon-shopping-cart add-cart"  data-toggle="modal" data-target="#login"></i></a>
                        @else
                        <a href="javascript:void(0);" data-toggle="tooltip" data-placement="left" title="添加到选片台"><i class="glyphicon glyphicon-plus add-project" data-toggle="modal" data-target=".bs-project-modal-sm" data-remote="/project/my-list/{{ $picture->id }}"></i></a>
                        <a href="javascript:void(0);" data-toggle="tooltip" data-placement="left" title="添加到购物车"><i class="glyphicon glyphicon-shopping-cart add-cart"></i></a>
                        @endif
                    </div>
                </div>
                <div class="pic">
                   <a href="javascript:void(0);" data-remote="/picture/info/{{ $picture->id }}" data-toggle="modal" data-target="#photo-modal">
                       <img src="{{ '/uploads/picture/' . $picture->thumb }}" alt="" />
                   </a>
                </div>
                <div class="user-info">
                    <img src="/img/photographer-01.png" alt="" class="pull-left">
                    <h5 class="pull-left">{{ $picture->userInfo->firstname . ' ' . $picture->userInfo->lastname }}</h5>
                </div>
            </div>
        </div>
        @endforeach


    </div>
    {{ $pictures->links() }}

    @if(count($pictures) == 0 && $keyword != '')
		<div class="alert alert-danger" role="alert"> 没有相关图片！
	@endif

</div>
@stop




